-
Notifications
You must be signed in to change notification settings - Fork 173
Update transient & report invalid HNS states #496
Update transient & report invalid HNS states #496
Conversation
/assign @adrianludwin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great commenting!
Only high-level change is that you can/should probably undo the changes to the kubectl client, as explained below.
c9d171f
to
5c34374
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
/hold
/assign @rjbez17
Update transient HNS states and report invalid states if bypassing the admission controller. Add a channel in the HNS reconciler to enqueue HNS for reconciliation. Add HNS reconciler and HC reconciler into each other so that they can enqueue the other resource. Sync the HNS instances in HNS reconciler, instead of syncing the spec.requiredChildren in "syncChildren()" func in HC reconciler. Add integration tests to test all different states. Tested with integration tests ("make test" & "make test HNS=1") and on GKE cluster. To test manually, I added the "enable-hns-reconciler" flag and commented out the webhook "Prevent changing parent of a required child" part, since it uses the "RequiredChildOf" field in the forest. I tested deleting the subnamespace, changing the annotation, change the parent of the subnamespace. They all worked as expected.
5c34374
to
52a1559
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, rjbez17, yiqigao217 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Update transient HNS states and report invalid states if bypassing the
admission controller. Add a channel in the HNS reconciler to enqueue
HNS for reconciliation. Add HNS reconciler and HC reconciler into each
other so that they can enqueue the other resource. Sync the HNS
instances in HNS reconciler, instead of syncing the
spec.requiredChildren in "syncChildren()" func in HC reconciler. Add
integration tests to test all different states.
Tested with integration tests ("make test" & "make test HNS=1") and
on GKE cluster. To test manually, I added the "enable-hns-reconciler"
flag and commented out the webhook "Prevent changing parent of a
required child" part, since it uses the "RequiredChildOf" field in the
forest. I tested deleting the subnamespace, changing the annotation,
change the parent of the subnamespace. They all worked as expected.
Part of #457 , #459 , #487 .